﻿// See https://aka.ms/new-console-template for more information

using Class7;

Person qi = new Person("周子祺");
Person mother = new Person("妈妈");

int homeMoney = 10000;

Home.SetTotalMoney(homeMoney);
int i = 0;
while (i < 10)
{
    qi.Pay(20+i);
    mother.Pay(30+i);
    i++;
}

qi.ShowPayRecords();
mother.ShowPayRecords();
Home.ShowTotalMoney();














//创建两个对象个体  xiaoqi,mother
//家里总钱数  totalMoney
//Pay 
//records



//int n=Calculator.Sum(1, 2);
//Console.WriteLine(n);

//ClassName myClass = new ClassName();
//myClass.PropertyName = "test name";
//myClass.FunctionName("test param","test param1",1000);
//myClass._fieldName = "field name";
//ClassName._staticFieldName = "static field name one";

//ClassName myClass2 = new ClassName();
//myClass2._fieldName = "field2 name";
//ClassName._staticFieldName = "static field name two";

//Console.WriteLine(ClassName._staticFieldName);


//Console.WriteLine("Hello world");
//ClassName.StaticFunctionName("testtest");
//ClassName.StaticPropertyName = "static property name";
//ClassName._staticFieldName = "static field name";


//定义一个类
public class ClassName
{
    //构造函数  方法
    //可以省略
    //初始话操作
    public ClassName() { 

    }
    //重载方法
    public ClassName(string defaultName) 
    {
        this.PropertyName = defaultName;
    }

    public string _fieldName = "";
    //属性
    public string PropertyName {  get; set; }
    //方法
    public void FunctionName(string param)
    {
        Console.WriteLine(this.PropertyName+" "+ param);
    }
    //重载方法
    public void FunctionName()
    {
        Console.WriteLine("no param functionName");
    }
    public void FunctionName(string param,string param1,int param2)
    {
        FunctionName(param);
        FunctionName(param1);
        FunctionName(param2.ToString());

    }

    //静态字段
    public static string _staticFieldName = "";
    //静态属性
    public static string StaticPropertyName {  get; set; }
    //静态方法
    public static void StaticFunctionName(string param)
    {

    }
}
